import styled from 'styled-components'
import logo from '../../static/logo.png'
export const HeaderWrapper = styled.div`
  position: relative;
  height: 56px;
  border-bottom: 1px solid #f0f0f0;
`

export const Logo = styled.a`
  position: absolute;
  height:58px;
  top:0;
  left: 0;
  width: 100px;
  display:block;
  background:url(${logo});
  background-size:contain;
`

export const Nav = styled.div`
  width:960px;
  height:100%;
  padding-right:70px;
  box-sizing:border-box;
  margin:0 auto;
`

export const NavItem = styled.div`
  line-height: 56px;
  padding:0 15px;
  color:#333;
  font-size:17px;
  &.left{
    float:left;
  }
  &.right{
    float:right;
    color:#969696;
  }
  &.active{
    color:#ea6f5a;
  }
`
export const NavSearchWrap = styled.div`
  float:left;
  position:relative;
  .iconfont.zoom{
    position: absolute;
    right: 5px;
    bottom: 5px;
    width:30px;
    height:30px;
    line-height:30px;
    text-align:center;
    border-radius:15px;
    
  }
`
export const NavSearch = styled.input.attrs({
  placeholder: '搜索'
})`
  width:160px;
  height: 38px;
  border: none;
  outline: none;
  border-radius: 19px;
  background:#eeeeee;
  margin-top:9px;
  font-size:14px;
  box-sizing:border-box;
  padding: 0 35px 0 20px;
  color: #777777;
  margin-left: 20px;
  &.slide-enter{
    width:160px;
    transition: all .2s ease-out;
  }
  &.slide-enter-active{
    width:240px;
  }
  &.slide-exit{
    transition: all .2s ease-out;
  }
  &::placeholder{
    color:#999;
  }
  &.focused{
    width:200px;
    & + .iconfont{
      background:#777;
      color:#fff;
    }
  }
`
export const SearchInfo = styled.div`
  position: absolute;
  left: 0;
  top:56px;
  width:240px;
  padding: 0 20px;
  box-shadow: 0 0 8px rgba(0,0,0,.2);
  background:#fff;
`
export const SearchInfoTitle = styled.div`
  margin-top: 20px;
  margin-bottom: 15px;
  line-height:20px;
  font-size:14px;
  color:#969696;
`
export const SearchInfoSwitch = styled.span`
  float:right;
  font-size:12px;
  cursor:pointer;
  .spin{
    margin-right:2px;
    transition: all .2s ease-in;
    transform: rotate(0deg);
    display:inline-block;
  }
`
export const SearchInfoList = styled.div`
  overflow: hidden;
  z-index:100;
`

export const SearchInfoItem = styled.a`
  line-height: 20px;
  padding: 0 5px;
  font-size:12px;
  border: 1px solid #ddd;
  border-radius:2px;
  display: block;
  float: left;
  color: #787878;
  margin-right: 10px;
  margin-bottom: 15px;
`

export const Addition = styled.div`
  position: absolute;
  right: 0;
  top:0;
  height: 56px;
`

export const Button = styled.div`
  float:right;
  line-height: 38px;
  border-radius:19px;
  margin-top:9px;
  border: 1px solid #ec6149;
  margin-right:20px;
  padding: 0 20px;
  font-size: 14px;
  &.reg{
    color:#ec6149
  }
  &.write{
    color: #fff;
    background: #ec6149;
  }
`